#ifndef MOCHA_DETAIL_GRAPHICS_PLUGIN_HPP_INCLUDED
#define MOCHA_DETAIL_GRAPHICS_PLUGIN_HPP_INCLUDED

/**
 * @file
 */

#include <cstdint>
#include <boost/noncopyable.hpp>
#include "mocha/color.hpp"
#include "mocha/graphics_plugin.h"
#include "mocha/interface_language.hpp"
#include "mocha/plugin.hpp"

namespace mocha { namespace graphics {
using ::mocha_graphics_caps;
using ::mocha_c_graphics_plugin;
typedef mocha_graphics_caps graphics_caps;
typedef mocha_c_graphics_plugin c_graphics_plugin;
/**
 * 
 */
class graphics_plugin : public plugin, public boost::noncopyable {
public:
	virtual std::int32_t capabilities(graphics_caps& caps) const = 0;
	virtual std::int32_t open_display_mode(std::uint32_t width, std::uint32_t height, bool full) = 0;
	virtual std::int32_t swap_buffers() = 0;
	virtual std::int32_t clear_back_buffer(rgba_t cc) = 0;
};
}
template<>
struct interface_language<mocha::graphics::c_graphics_plugin> {
	enum { language = mocha_plugin_language_c };
};
template<>
struct interface_language<mocha::graphics::graphics_plugin> {
	enum { language = mocha_plugin_language_cpp };
};
}

#endif

